<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>sign in page</title>
    <script src="/jquery-3.4.1.min.js"></script>
    <style>
        .form {
            width: 500px;
            height: 300px;
            border: 2px solid grey;
            text-align: center;
            margin: 0 auto;
            background-image: url("雪山.jpg");
            background-repeat: no-repeat;
            background-size: 100%;

        }

        .div2, .div3, .signin-btn {
            margin: 20px;
            text-align: center;
        }
        .div4{
            /*text-align:center;*/

        }



    </style>
</head>
<body>
<form action="/checkemailcode" method="post">
    <div class="form">
        <div class="div2">
            <label >账号</label>
            <input type="text" name="name" placeholder="手机，邮箱">
        </div>
        <div class="div4">
            <label >验证码</label>
            <input type="text" name="captcha" placeholder="请输入验证码">
            <a href="javaScript:reloadCaptcha()"><img src="../captcha" id="captchaImg"></a>
        </div>
        <div>
            <label >邮箱验证码</label>
            <input type="text" name="emailcode" placeholder="邮箱验证码">
            <div class="buttons">
<!--                <button class="button is-primary">Primary</button>-->
<!--                点击获取验证码，jquery实现-->
                <button class="button is-link" id="email-btn" type="button">获取验证码</button>
            </div>
        </div>
        <div class="div3">
            <label >密码</label>
            <input type="password" name="password" placeholder="输入密码">
        </div>
        <div class="signin-btn">
            <button type="submit">登陆</button>
        </div>
    </div>
</form>
<script>
    function  reloadCaptcha() {
        var captchaImg=document.getElementById("captchaImg");
        captchaImg.src="/captcha?t="+(new Date()).getTime();
        
    }


</script>
</body>
</html>